import request from "@/utils/request";

export function listAccount(params) {
  return request({
    url: "/account",
    method: "get",
    params,
  });
}

export function listPageAccount(params) {
  return request({
    url: "/account/page",
    method: "get",
    params,
  });
}

export function saveAccount(params) {
  return request({
    url: "/account",
    method: "post",
    data: params,
  });
}

export function updateAccount(id,params) {
  return request({
    url: `/account/${id}`,
    method: "put",
    data: params,
  });
}

export function deleteAccount(id) {
  return request({
    url: `/account/${id}`,
    method: "delete",
  });
}

export function deleteBatchAccount(idList) {
  return request({
    url: `/account/batch`,
    method: "delete",
    data: idList,
  });
}

export function getAccountById(id) {
  return request({
    url: `/account/${id}`,
    method: "get",
  });
}
